package com.eveinfo.notification;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;

public class Alarm {

	private static int REQUEST_CODE = 0;

	public static void setNotification(Context context, long time) {
		Intent intent = new Intent(context, AlarmReceiver.class);
		REQUEST_CODE++;
		final String ring = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION).toString();
		intent.putExtra("Ringtone", ring);
		intent.putExtra("vibrationPatern", new long[] { 200, 300 });
		intent.putExtra("notification", REQUEST_CODE);
		PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE, intent, 0);
		AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
		alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + time, pendingIntent);

	}
	
	public static void saveNotifications(){
		
	}

}
